
import requests
import time
import ipython_pygments_lexers

headers = {
    'user-agent' : 'Mozilla/5.0(Windows NT 10.0;)'AppleWebkit/537.36(KHTML,like Gecko) Chore/136.0.0.0
    Safari/537.36 Edg/136 }
    
# 创建存储数据的列表
movies_data = []

for start_num in range(0,250,25)
req = requests.get('https://digital.it168.com/chanel-9-att-1-1-page-1.shtml',headers={})
print(req.status_code) 
soup = beautifulsoup(content,"html.parser")
# 获取所有电影条目
movie_items =soup.find_all('div',class= 'title')

for item in movie_itmes
# 获取电影标题
title_tag = item.find('span',class='title')

#获取电影封面
img_tag = item.find('img')
cover_url=img_tag

# print('connection', req.connection)
# print('headers',req.headers)
# print('请求的对象',req.request)
# session会话
# security
# print('content',req.content)
# print('text',req.text)



from bs4 import Beautifulsoup
soup = Beautifulsoup(req.content, 'html.parser'）
# print(soup.prettify())content_left = soup.find('div',class_='relevant pub-bg')
items = content_left.find_all('li'）
items = items[e]
mess = item.find('div', class_='mess')
title = mess.find('a').text
txt = mess.find("p').text
img = item.find("img')['src']

print(type(items), len(items))
print(title)
print(txt)
print(img)

        